cs-visual-time-banca-seguros-sapi
๐ API Documentation - cs-visual-time-banca-seguros-sapi
This section describes the attributes and usage of the cs-visual-time-banca-seguros-sapi API Service.
๐๏ธ Base Information
- API Title: cs-visual-time-banca-seguros-sapi
- Version: 1.0
- Base URL:
https://cs-visual-time-banca-seguros-sapi-{env}-v1.us-e1.cloudhub.io/api/
Replace{env}
with:dev
(Development)qa
(Quality Assurance)prod
(Production)
๐ Authentication
The API implements two security schemes:
- client-id-enforcement
- OAuth2
Required Headers
Header | Type | Description |
---|---|---|
client_id | String | Unique identifier for API clients |
Authorization | String | OAuth2 authorization token |
- client_id
- Length: 32 - 36 characters
- Example:
123e4567-e89b-12d3-a456-426614174000
- Authorization
- Format: Bearer token
- Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
๐ These headers are required in all requests.
๐ Common Headers
Most endpoints in this API require the following standard request headers:
Header | Type | Required | Description |
---|---|---|---|
Content-Type | String | โ | Media type of the request body |
Accept | String | โ | Media types acceptable for response |
client_id | String | โ | API client identifier |
Authorization | String | โ | OAuth2 Bearer token |
Specific endpoints may require additional headers. Refer to the detailed endpoint documentation for specific requirements.
๐ Request & Response Format
Request Format
The API supports the following request formats:
application/json
- For JSON payloadsapplication/x-www-form-urlencoded
- For form datamultipart/form-data
- For file uploads
Response Format
The API primarily returns responses in:
application/json
- For structured data responsestext/plain
- For simple text responses
Each response includes appropriate HTTP status codes and headers.
๐ API Structure Overview
This API is organized into several functional areas:
- Policy Issuance - Management of policy issuance lifecycle
- Quotations - Quotation process operations
- Claims Management - Coverage affected by claims
- Policy Cancellations - Cancellation and removal operations
- PostgreSQL Operations - Direct database interactions
- Utilities - Support functions and custom queries
- Date Range Queries - Time-based policy consultations
- Document Management - Document number retrieval
- Sales Channel Integration - Module management by sales channel
- Insured Persons - Creation and management of insured persons
- Life Insurance Matrix - Life policy issuance matrix operations
For detailed information on each endpoint, including request/response formats and parameters, refer to the specific endpoint documentation.
๐ Security Schemes
Client ID Enforcement
Field | Type | Required | Length | Regex |
---|---|---|---|---|
client_id | String | Yes | 32 - 36 | [a-zA-Z0-9] |
OAuth2
Field | Type | Required | Description |
---|---|---|---|
Authorization | String | Yes | Bearer token for authorization |
The API uses both client_id-enforcement and OAuth2 as security schemes. All requests must include both a valid client_id and OAuth2 Bearer token in the request headers.
โ ๏ธ Error Codes
Code | Description | Suggested Solution |
---|---|---|
400 | Bad Request | Check request syntax and parameters. |
401 | Unauthorized | Validate authentication credentials. |
404 | Not Found | Confirm the endpoint URL. |
500 | Internal Server Error | Retry or contact technical support. |
All API endpoints implement common HTTP error code handling as defined in the API specification.
๐ Endpoint Documentation Example
/issuing-of-policy-status
Get policy issuance status from Visual Time system.
- URL:
https://cs-visual-time-banca-seguros-sapi-{env}-v1.us-e1.cloudhub.io/api/issuing-of-policy-status
- Method: GET
- Authentication: client_id and OAuth2
- Required Headers:
- Accept: application/json
- client_id: [your-client-id]
- Authorization: Bearer [your-token]
Query Parameters:
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
productId | number | No | Product ID | 31300 |
policyId | number | No | Policy ID | 154241 |
flagCount | boolean | No | Flag indicating service type (true for counter, false for query) | true |
Request Example:
bash
curl -X GET \
'https://cs-visual-time-banca-seguros-sapi-prod-v1.us-e1.cloudhub.io/api/issuing-of-policy-status?productId=31300&policyId=154241&flagCount=true' \
-H 'Accept: application/json' \
-H 'client_id: 123e4567-e89b-12d3-a456-426614174000' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
Response Example:
json
{
"status": "success",
"data": {
"totalRecords": 25,
"pendingIssuance": 12,
"processedToday": 8,
"policies": [
{
"policyId": 154241,
"productId": 31300,
"status": "PENDING_ISSUANCE",
"createdDate": "2025-05-13T10:30:00Z",
"lastUpdate": "2025-05-13T14:15:30Z",
"documentNumber": "DOC-2025-001",
"effectiveDate": "2025-05-15T00:00:00Z"
}
]
}
}
/posgresql/creation-of-insured-persons
Create insured persons in PostgreSQL database.
- URL:
https://cs-visual-time-banca-seguros-sapi-{env}-v1.us-e1.cloudhub.io/api/posgresql/creation-of-insured-persons
- Method: POST
- Authentication: client_id and OAuth2
- Required Headers:
- Content-Type: application/json
- Accept: application/json
- client_id: [your-client-id]
- Authorization: Bearer [your-token]
Request Example:
bash
curl -X POST \
https://cs-visual-time-banca-seguros-sapi-prod-v1.us-e1.cloudhub.io/api/posgresql/creation-of-insured-persons \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'client_id: 123e4567-e89b-12d3-a456-426614174000' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
-d '{
"documentType": 1,
"documentNumber": "79533115",
"firstName": "John",
"lastName": "Doe",
"birthDate": "1980-05-15",
"gender": "M",
"contactInfo": {
"email": "john.doe@email.com",
"phoneNumber": "+573102345678",
"address": "Calle 123 #45-67, Bogotรก"
},
"policyInfo": {
"policyNumber": "POL-2025-001",
"productId": 31300,
"coverage": "LIFE_INSURANCE",
"beneficiaries": [
{
"name": "Jane Doe",
"relationship": "SPOUSE",
"percentage": 100
}
]
}
}'
Response Example:
json
{
"status": "success",
"data": {
"insuredPersonId": "IP-2025-001",
"documentNumber": "79533115",
"creationDate": "2025-05-13T16:20:10Z",
"policyAssignment": {
"policyNumber": "POL-2025-001",
"status": "ACTIVE",
"effectiveDate": "2025-05-15T00:00:00Z"
}
}
}
๐ Note: These are example endpoints. The API contains 22 endpoints total as listed in the API Structure Overview section. For detailed information about other endpoints, please refer to the complete API documentation.
๐ Common Query Parameters
Many endpoints in this API accept the following common query parameters:
Parameter | Type | Description | Example |
---|---|---|---|
startDate | string | Start date for range queries | "2024-10-02 00:00:00" |
endDate | string | End date for range queries | "2024-10-15 23:59:59" |
limit | string | Maximum number of results to return | "10" |
productId | number | Product identifier | 31300 |
policyId | number | Policy identifier | 154241 |
claimNumber | string | Claim number for claims operations | "2030007501" |
policyNumber | string | Policy number | "40998" |
company | string | Company type (vida-1 or generales-2) | "1" |
๐ Database Operations
This API performs direct operations with PostgreSQL database through stored procedures and functions. Key database operations include:
- Policy Assignment: Automatic assignment of policy numbers
- Status Updates: Real-time status updates for policies
- Data Validation: Comprehensive validation before database insertion
- Transaction Management: Ensuring data consistency across operations
- Audit Trail: Tracking all database modifications
๐ Support
For assistance, contact the Integration Services and Applications Coordination team.
๐ง epalma@fgs.co
Last updated: June 2025